const fs = require('fs');
const express = require('express');
const bodyParser = require('body-parser');
const api = require('./api');

const app = express();
app.listen(7000);
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended : true }));
app.use('/dist', express.static('./dist'));
app.use('/static', express.static('./dist/static'));
app.use('/api', api);
app.get('/favicon.ico', (req, res) => {
  fs.createReadStream('./favicon.ico').pipe(res);
});
